package gouroutine_pool

import (
	"errors"
	"fmt"
)

type DefaultRejectStrategy struct {
}

// 默认的添加策略,丢弃
func (s *DefaultRejectStrategy) Reject(p *GoroutinePool, t *Task) (interface{}, error) {
	fmt.Println("对象池已满,任务id:", t.id, "将会被丢弃,任务数据为:", t)
	return nil, errors.New("abort task")
}
